package com.gopay.common.cps.service.check.impl;

import com.gopay.common.cps.dao.check.OrderTranAcctDtlDAO;
import com.gopay.common.cps.service.check.OrderTranAcctDtlCheckService;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;

import javax.annotation.Resource;
import java.util.List;

/**
 * description ：订单账务状态校验服务实现类
 * edit by ：lx
 * datetime ：2017/8/15 17:51
 */
@Service("orderTranAcctDtlCheckService")
public class OrderTranAcctDtlCheckServiceImpl implements OrderTranAcctDtlCheckService {
    @Resource(name = "orderTranAcctDtlDAO")
    private OrderTranAcctDtlDAO orderTranAcctDtlDAO;
    @Override
    public boolean checkHasFinishedFirstStepAcctRecord(String gopayOrderId) {
        List<Object[]> list = orderTranAcctDtlDAO.getListByGopayOrderId(gopayOrderId);
        return !CollectionUtils.isEmpty(list);
    }
}
